Integrand size = 27, antiderivative size = 74 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a \text {arctanh}(\cos (c+d x))}{8 d}-\frac {b \cot ^3(c+d x)}{3 d}+\frac {a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d} \]
1/8*a*arctanh(cos(d*x+c))/d-1/3*b*cot(d*x+c)^3/d+1/8*a*cot(d*x+c)*csc(d*x+ c)/d-1/4*a*cot(d*x+c)*csc(d*x+c)^3/d
Time = 0.02 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.82 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {b \cot ^3(c+d x)}{3 d}+\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \]
-1/3*(b*Cot[c + d*x]^3)/d + (a*Csc[(c + d*x)/2]^2)/(32*d) - (a*Csc[(c + d* x)/2]^4)/(64*d) + (a*Log[Cos[(c + d*x)/2]])/(8*d) - (a*Log[Sin[(c + d*x)/2 ]])/(8*d) - (a*Sec[(c + d*x)/2]^2)/(32*d) + (a*Sec[(c + d*x)/2]^4)/(64*d)
Time = 0.52 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {3042, 3317, 3042, 3087, 15, 3091, 3042, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a+b \sin (c+d x))}{\sin (c+d x)^5}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \cot ^2(c+d x) \csc ^3(c+d x)dx+b \int \cot ^2(c+d x) \csc ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx+b \int \sec \left (c+d x-\frac {\pi }{2}\right )^2 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx+\frac {b \int \cot ^2(c+d x)d(-\cot (c+d x))}{d}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx-\frac {b \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle a \left (-\frac {1}{4} \int \csc ^3(c+d x)dx-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {b \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \left (-\frac {1}{4} \int \csc (c+d x)^3dx-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {b \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle a \left (\frac {1}{4} \left (\frac {\cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \csc (c+d x)dx\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {b \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \left (\frac {1}{4} \left (\frac {\cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \csc (c+d x)dx\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {b \cot ^3(c+d x)}{3 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle a \left (\frac {1}{4} \left (\frac {\text {arctanh}(\cos (c+d x))}{2 d}+\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {b \cot ^3(c+d x)}{3 d}\) |
-1/3*(b*Cot[c + d*x]^3)/d + a*(-1/4*(Cot[c + d*x]*Csc[c + d*x]^3)/d + (Arc Tanh[Cos[c + d*x]]/(2*d) + (Cot[c + d*x]*Csc[c + d*x])/(2*d))/4)
3.11.57.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> Simp[1/f Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] && !(IntegerQ[(n - 1) /2] && LtQ[0, n, m - 1])
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.29 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.22
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(90\) |
default | \(\frac {a \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {b \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(90\) |
parallelrisch | \(\frac {3 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -24 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-3 a}{192 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}\) | \(113\) |
risch | \(-\frac {-24 i b \,{\mathrm e}^{6 i \left (d x +c \right )}+3 a \,{\mathrm e}^{7 i \left (d x +c \right )}+24 i b \,{\mathrm e}^{4 i \left (d x +c \right )}+21 a \,{\mathrm e}^{5 i \left (d x +c \right )}-8 i b \,{\mathrm e}^{2 i \left (d x +c \right )}+21 a \,{\mathrm e}^{3 i \left (d x +c \right )}+8 i b +3 a \,{\mathrm e}^{i \left (d x +c \right )}}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}\) | \(148\) |
norman | \(\frac {-\frac {a}{64 d}-\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d}+\frac {b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(169\) |
1/d*(a*(-1/4/sin(d*x+c)^4*cos(d*x+c)^3-1/8/sin(d*x+c)^2*cos(d*x+c)^3-1/8*c os(d*x+c)-1/8*ln(csc(d*x+c)-cot(d*x+c)))-1/3*b/sin(d*x+c)^3*cos(d*x+c)^3)
Leaf count of result is larger than twice the leaf count of optimal. 137 vs. \(2 (66) = 132\).
Time = 0.28 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.85 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {16 \, b \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + 6 \, a \cos \left (d x + c\right )^{3} + 6 \, a \cos \left (d x + c\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{48 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]
-1/48*(16*b*cos(d*x + c)^3*sin(d*x + c) + 6*a*cos(d*x + c)^3 + 6*a*cos(d*x + c) - 3*(a*cos(d*x + c)^4 - 2*a*cos(d*x + c)^2 + a)*log(1/2*cos(d*x + c) + 1/2) + 3*(a*cos(d*x + c)^4 - 2*a*cos(d*x + c)^2 + a)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)
Timed out. \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\text {Timed out} \]
Time = 0.20 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.08 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 \, a {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {16 \, b}{\tan \left (d x + c\right )^{3}}}{48 \, d} \]
-1/48*(3*a*(2*(cos(d*x + c)^3 + cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) + 16*b/tan(d* x + c)^3)/d
Time = 0.32 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.57 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {50 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
1/192*(3*a*tan(1/2*d*x + 1/2*c)^4 + 8*b*tan(1/2*d*x + 1/2*c)^3 - 24*a*log( abs(tan(1/2*d*x + 1/2*c))) - 24*b*tan(1/2*d*x + 1/2*c) + (50*a*tan(1/2*d*x + 1/2*c)^4 + 24*b*tan(1/2*d*x + 1/2*c)^3 - 8*b*tan(1/2*d*x + 1/2*c) - 3*a )/tan(1/2*d*x + 1/2*c)^4)/d
Time = 9.60 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.51 \[ \int \cot ^2(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {a}{4}\right )}{16\,d} \]